package com.ghsc.ghxc.jsb.view

import android.content.Context
import android.widget.TextView
import com.flyco.roundview.RoundTextView
import com.ghsc.ghxc.jsb.R
import com.lxj.xpopup.core.CenterPopupView

/**
 * 项目：CutePair
 * 包名：com.cn.cutepair.ui.dynamic.view
 * 类名：UserInfoOtherPartyViiew
 * 创建时间：2022/7/21 20:28
 * 创建人 @author： xiaolin
 * 描述 ：Todo...确定和取消弹窗
 */
class ConfirmCancelPopViiew(context: Context,title:String,content:String, btnConfirm:()->Unit,btnCancel:()->Unit) : CenterPopupView(context) {
    private var btnConfirm: () -> Unit = btnConfirm
    private var btnCancel: () -> Unit = btnCancel
    private var content=content
    private var title=title
    override fun getImplLayoutId() = R.layout.pw_confirm_cancel

    override fun onCreate() {
        super.onCreate()
        findViewById<TextView>(R.id.tvTitle).text=title
        findViewById<TextView>(R.id.tvContent).text=content
        findViewById<RoundTextView>(R.id.tvBtnConfirm).setOnClickListener {
            btnConfirm.invoke()
            dismiss()
        }
        findViewById<TextView>(R.id.tvBtnCancel).setOnClickListener {
            btnCancel.invoke()
            dismiss()
        }



    }
}